﻿using System;
using System.Reflection;

namespace Hydra.Shell.Interfaces
{
    public enum PackageMessageType
    {
        Loading,
        FoundInCache,
        LoadingFromCache,
        CacheOutdated,
        Opening,
        Downloading, 
        Downloaded,
        LoadingAssembly,
        Caching,
        Cached,
        LoadingService,
        FoundService
    }

    public interface IPackageAgent
    {
        void SendGeneralMessage(string message);
        void SendGeneralError(Exception ex);
        void SendPackageMessage(IHydraPackageListItem package, PackageMessageType messageType, string extra = null);
        void SendPackageError(IHydraPackageListItem package, Exception ex);
        void SendPackageMessage(IHydraPackage package, PackageMessageType messageType, string extra = null);
        void SendPackageError(IHydraPackage package, Exception ex);
        void SendPackageMessage(Assembly packageAssembly, Guid packageGuid, PackageMessageType messageType, string extra = null);
        void SendPackageError(Assembly packageAssembly, Guid packageGuid, Exception ex);
    }
}
